﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using forum.ApplicationCode;

namespace forum
{
    public partial class UserArea : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            // Reload the page, not from broswer's cache
            Response.AppendHeader("Cache-Control", "no-store");

            if (Membership.GetUserName()=="")
                Response.Redirect("forumWelcome.aspx");

            ddlSubForumAComplaint.DataSource = ListManager.GetSubForumList();
            ddlSubForumAComplaint.DataTextField = "_Text";
            ddlSubForumAComplaint.DataValueField = "_Value";
            ddlSubForumAComplaint.DataBind();

            ddlModerators.DataSource = ListManager.GetFirstForumModerators();
            ddlModerators.DataTextField = "_Text";
            ddlModerators.DataValueField = "_Value";
            ddlModerators.DataBind();
            ddlModerators.Items.Insert(0, new ListItem("Choose Moderator", "0"));
            ddlModerators.Items[0].Selected = true;


        }
    }
}